package com.halflife.comeElectricity.basic.address;

import com.halflife.comeElectricity.orderMng.order.dto.SiteDTO;

public class Address {
    private Integer id;

    private String userAddress;

    private String userAddressDetail;

    private String userName;

    private String userContact;

    private String locationLan;

    private String locationLat;

    private Integer groupId;

    public Address getAddressBySiteDTO(SiteDTO s){

        if(s.getUserAddress()!=null)
            this.userAddress= s.getUserAddress();
        if(s.getUserAddressDetail()!=null)
            this.userAddressDetail= s.getUserAddressDetail();
        if(s.getUserName()!= null)
            this.userName= s.getUserName();
        if(s.getUserContact()!= null)
            this.userContact= s.getUserContact();
        if(s.getLocationLan()!=null)
            this.locationLan= s.getLocationLan();
        if(s.getLocationLat()!=null)
            this.locationLat= s.getLocationLat();
        return this;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress == null ? null : userAddress.trim();
    }

    public String getUserAddressDetail() {
        return userAddressDetail;
    }

    public void setUserAddressDetail(String userAddressDetail) {
        this.userAddressDetail = userAddressDetail == null ? null : userAddressDetail.trim();
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getUserContact() {
        return userContact;
    }

    public void setUserContact(String userContact) {
        this.userContact = userContact == null ? null : userContact.trim();
    }

    public String getLocationLan() {
        return locationLan;
    }

    public void setLocationLan(String locationLan) {
        this.locationLan = locationLan == null ? null : locationLan.trim();
    }

    public String getLocationLat() {
        return locationLat;
    }

    public void setLocationLat(String locationLat) {
        this.locationLat = locationLat == null ? null : locationLat.trim();
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }
}